program crdstack;

uses crdnodes, crdstacks;

var
   i : integer;
   t : link;

begin
   (* czytanie danych dla elementow *)
   NodesNr := ReadData('crdstack.in');
   
   (* odkladanie elementow na stos *)
   for i := 1 to NodesNr do
      push(NodesTab[i]);

   (* pobranie elementow ze stosu *)
   t := top;
   while t <> nil do
   begin
      print(t);
      t := t^.next;
   end;
end.
